package hitExceptions;

@SuppressWarnings("serial")
public class InvalidOperationException extends Exception {


	private String msg;

	/**
	 * Empty constructor
	 */
	public InvalidOperationException()
	{
		msg="";
	}

	/**
	 * Constructor that set the message string
	 * @param msg sets the exceptions message
	 */
	public InvalidOperationException(String msg)
	{
		this.msg=msg;
	}

	/**
	 * @return the msg
	 */
	public String getMsg()
	{
		return msg;
	}

	/**
	 * @param msg the msg to set
	 */
	public void setMsg(String msg)
	{
		this.msg = msg;
	}

	/* (non-Javadoc)
	 * @see java.lang.Throwable#getStackTrace()
	 */
	@Override
	public StackTraceElement[] getStackTrace()
	{
		System.err.println(msg);
		return super.getStackTrace();
	}


	/* (non-Javadoc)
	 * @see java.lang.Throwable#toString()
	 */
	@Override
	public String toString()
	{

		return msg.toString();
	}
}
